package com.allwees.bs.module.core.req;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.apache.commons.lang3.StringUtils;

/**
 * BranchUser相关的Query
 *
 * @author yangylsky
 * @since 2019-12-25
 *
 */
public interface BranchUserQuery<T> {
	String getSupplierUuid();

	String getRetailerUuid();

	String getStoreUuid();

	default QueryWrapper<T> buildBranchUserQuery(QueryWrapper<T> queryWrapper) {
		return queryWrapper
				.eq(StringUtils.isNotBlank(getSupplierUuid()), "supplier_uuid", getSupplierUuid())
				.eq(StringUtils.isNotBlank(getRetailerUuid()), "retailer_uuid", getRetailerUuid());
//				.eq(StringUtils.isNotBlank(getStoreUuid()), "store_uuid", getStoreUuid());
	}
}
